<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>Untitled Document</title>
		<script src="js/jquery.js"></script>
		<script src="js/json.js"></script>
		<script src="js/jproxy.js"></script>				
		<script src="js/jquery.jproxy.js"></script>						
	</head>
	<body>
		
		<div>teste</div>
		
		<div>dois</div>
		<script>

extend = function() {
	var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
	if ( target.constructor == Boolean ) {
		deep = target;
		target = arguments[1] || {};
		i = 2;
	}
	if ( typeof target != "object" && typeof target != "function" )
		target = {};

	if ( length == 1 ) {
		target = this;
		i = 0;
	}

	for ( ; i < length; i++ )
		if ( (options = arguments[ i ]) != null )
			for ( var name in options ) {
				if ( target === options[ name ] )
					continue;
				if ( deep && options[ name ] && typeof options[ name ] == "object" && target[ name ] && !options[ name ].nodeType )
					target[ name ] = jQuery.extend( target[ name ], options[ name ] );
				else if ( options[ name ] != undefined )
					target[ name ] = options[ name ];
			}
	return target;
};


			highlight = { 
				start : {},
				end : {}
			}

			extend(highlight.start, [
				function(){
					alert(1)
				}
			]);
			extend(highlight.end, [
				function(){
					alert(2)
				}
			]);

			actionCallback = function() {
				Plugin.on(highlight.start);
				alert('ok');
				Plugin.on(highlight.end);
			}

			
			Plugin = {
				on : function(f){
					for (var i=0;f[i];i++) 
						f[i].call()
				}
			}
			
			actionCallback()

			
//			$('div').jProxy('class.method', json);
			
//			$.jProxy('class.method', json, actionCallback);
			
//			alert($.jProxy.url);

			
		</script>
		
	</body>
</html>
